<?php
/**
 * Created by PhpStorm.
 * User: huqi
 * Date: 2019-12-29
 * Time: 04:16
 */

namespace WebUtil\Matrix\Layer;


class ArrayUtilLayer implements ILayer
{

    private $type;

    public function __construct($type)
    {
        $this->type = $type;
    }

    public function transform($input)
    {
        switch ($this->type){
            case 'first':
                return $input[0];
                break;
            default:
                return $input;
        }
    }
}